<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<%@ taglib uri="/WEB-INF/tld/sys.tld" prefix="sys" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>客户风险标记操作日志</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<div id="ligergrid1" class="sq-grid"></div>
</div>

<script type="text/javascript">
    var grid = null;

    $(function () {
        initGrid();//注意初始化要在initForm之后,因为在初始化grid的时候需要form参数
    });

    //初始化列表
    function initGrid() {
        $("#ligergrid1").ligerGrid({
            url: '<%=path%>/risk/rskCstSignLog/initList.do',
            method: 'get',
            parms: {
                'cstId' : '${cstId}',
                'cstNm' : '${cstNm}',
                'signSource' : '${signSource}',
                'cstTypeCd' : '${cstTypeCd}',
                'cstIdcard' : '${cstIdcard}'
            },
            columns: [
                {display: '客户名称', name: 'cstNm', minWidth: 60, align: 'center', enabledSort: false},
                {display: '证件号码', name: 'cstIdcard', minWidth: 180, align: 'center', enabledSort: false},
                {display: '风险来源', name: 'signSourceNm', minWidth: 70, align: 'center', enabledSort: false},
                {display: '客户类型', name: 'cstTypeCdNm', minWidth: 70, align: 'center', enabledSort: false},
                {display: '标记类型', name: 'signResTypeNm', minWidth: 70, align: 'center', enabledSort: false},
                {display: '标记原因', name: 'signResCdNm', minWidth: 100, align: 'left', enabledSort: false},
                {display: '状态', name: 'isValid', minWidth: 80, align: 'center',
                    render: function (rowdata, rowid, value) {
                        if (rowdata.isValid == 1) {
                            return "有效";
                        } else {
                            return "无效";
                        }
                    }
                },
                {display: '标记人', name: 'crtUsrNm', minWidth: 70, align: 'center', enabledSort: false},
                {display: '标记时间',name: 'crtTm',minWidth: 160,align: 'center',enabledSort: false, render: renderDate2},
                {display: '更新标记人', name: 'mdfUsrNm', width: 80, align: 'center', enabledSort: false},
                {display: '更新时间',name: 'mdfTm',minWidth: 160,align: 'center',enabledSort: false, render: renderDate2},
                {display: '备注', name: 'signRem', width: 300, align: 'left', enabledSort: true},
            ],
            pageSize: 10,
            root: 'rows',
            record: 'total',
            hideLoadButton: true,
            width: '100%',
            height: '100%',
            heightDiff: -2,
            checkbox: true,
            rownumbers: true
        });
        grid = liger.get("ligergrid1");
        grid.setHeight(100);
        grid.options.isSingleCheck = true;
    }

    //格式化时间
    function renderDate2(rowdata, index, value) {
        var dateStr = "";
        if (null != value) {
            var date = new Date(value);
            dateStr = DateUtils.formatDate(date, DateUtils.YYYY_MM_DDHHMMSS);
        }
        return dateStr;
    }

</script>

</body>
</html>